package c.c.b.a.a;

/* compiled from: SegmentPool */
public final class t {
    public static s a;
    public static long b;

    public static s a() {
        synchronized (t.class) {
            s sVar = a;
            if (sVar != null) {
                a = sVar.f;
                sVar.f = null;
                b -= 8192;
                return sVar;
            }
            return new s();
        }
    }

    public static void b(s sVar) {
        if (sVar.f != null || sVar.g != null) {
            throw new IllegalArgumentException();
        } else if (!sVar.d) {
            synchronized (t.class) {
                long j = b + 8192;
                if (j > 65536) {
                    return;
                }
                b = j;
                sVar.f = a;
                sVar.c = 0;
                sVar.b = 0;
                a = sVar;
            }
        }
    }
}
